#ifndef __OS_NET_H
#define __OS_NET_H

#include<sys/res.h>
#include<lib/list.h>

//netcard info block
typedef struct 
{
  list_t list;  
  int solt;
  int handle;
  devent_t devent;
  char virname[DEVICE_NAME_LEN+1];
}netcard_info_t;

//max support netcard num
#define NETCARD_SOLT_NUM 2

//netcard interface 
typedef struct 
{
    int (*open)();
    int (*close)();
    int (*read)(int ,void *,size_t);
    int (*write)(int,void *,size_t);
    int (*ioctl)(int,uint32_t,void *);
}netcard_driver_t;

extern netcard_driver_t netcard_drv;

int NetcardProbeDevice(device_type_t type);
int NetcardInfoPrint();
int NetcardInfoFindByName(char *name);
#if CONFIG_NET
void NetworkInit();
#endif
#endif